package com.zenagro.domain.zenagro.expedicion;

import java.util.*;

import javax.persistence.*;

import org.openxava.annotations.*;

import com.zenagro.domain.zenagro.*;
import com.zenagro.domain.zenagro.base.*;

@View(name="reference", members="matricula")
@Entity
@Table(name="camion")
public class Camion extends Identificable {

	@Column(name="matricula", unique=true)
	private String matricula;
	
    @OneToMany (targetEntity=com.zenagro.domain.zenagro.expedicion.Compartimento.class, fetch=FetchType.LAZY, mappedBy="camion", cascade=CascadeType.REMOVE)//, cascade=CascadeType.ALL)
    private Set <Compartimento> compartimentos = new HashSet<Compartimento>();

	public String getMatricula() {
		return matricula;
	}

	public void setMatricula(String matricula) {
		this.matricula = matricula;
	}

	public Set<Compartimento> getCompartimentos() {
		return compartimentos;
	}

	public void setCompartimentos(Set<Compartimento> compartimentos) {
		this.compartimentos = compartimentos;
	}
	
	
	
}
